function getRequest() {
    var url = window.location.search; //获取url中"?"符后的字串
    var theRequest = new Object();
    if (url.indexOf("?") != -1) {
        var str = url.substr(1);
        strs = str.split("&");
        for(var i = 0; i < strs.length; i ++) {
            //就是这句的问题
            theRequest[strs[i].split("=")[0]]=decodeURI(strs[i].split("=")[1]);
            //之前用了unescape()
            //才会出现乱码
        }
    }
    return theRequest;
}
var tableName = getRequest()['table_name'];
var source_pk = getRequest()['source_pk'];

let tableNames = ['外协框架协议','外协合同','销售合同','施工框架协议','工程基本信息','计划成本编制','工程决算管理','决算成本编制','外协计划','外协结算','收入发票登记','外协费'];
let table_name = ['wxkjxy','wxht','xsht','sgkjxy','gcjbxx','jhcbbz','gcjsgl','jscbbz','wxjh','wxjs','srfpdj','wxf'];

let pageSize = 10
$(document).on("change", '#selPageSize', () => { // 下拉选择每页数目促发事件
    pageSize = $("#selPageSize").val();
    load(tableName,source_pk);
})
function getTableNames() {
    return tableNames;
}
function getTable_name() {
    return table_name;
}
var  ph = window.innerHeight-150;
function load(tableName,source_pk){

    if(tableName == '外协框架协议') {
        $('#reportTable1').bootstrapTable('destroy').bootstrapTable({
            url: "api/queryLists?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: pageSize,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            search:true,
            trimOnSearch:true,
            exportTypes: ['csv', 'txt', 'xml'],
            // clickToSelect: true,
            columns: [
                {
                    checkbox: true
                },
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false",
                }, {
                    field: "outsourcing_agreement",
                    title: "外协协议名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "outsourcing_unit",
                    title: "外协单位名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'wxkjxy\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }

    if(tableName == '外协合同') {
        $('#reportTable2').bootstrapTable({
            url: "api/queryTableWxht?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "project_name",
                    title: "外协工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "project_code",
                    title: "工程编码",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "negotiation_name",
                    title: "外协商名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "total_incl",
                    title: "价税合计",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button"  onclick="onShowFile(\'' + row.source_pk + '\',\'wxht\',' + index + ')" class="btn btn-info" singleSelected=true >查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }

    if(tableName == '销售合同') {
        $('#reportTable3').bootstrapTable({
            url: "api/queryTableXsht?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "construction_unit",
                    title: "建设单位项目编号",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "contract_name",
                    title: "合同名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "total_incl",
                    title: "价税合计",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'xsht\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '施工框架协议') {
        $('#reportTable4').bootstrapTable({
            url: "api/queryTableSgkjxy?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "construction_unit",
                    title: "建设单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "agreement_name",
                    title: "框架协议名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'sgkjxy\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }

    if(tableName == '工程基本信息') {
        $('#reportTable5').bootstrapTable({
            url: "api/queryTableGcjbxx?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_no",
                    title: "工程编号",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_name",
                    title: "工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "estimated_amount",
                    title: "估算金额",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'gcjbxx\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }

    if(tableName == '计划成本编制') {
        $('#reportTable6').bootstrapTable({
            url: "api/queryTableJhcbbz?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_no",
                    title: "工程编码",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_name",
                    title: "工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'jhcbbz\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '工程决算管理') {
        $('#reportTable7').bootstrapTable({
            url: "api/queryTableGcjsgl?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_no",
                    title: "工程编号",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_name",
                    title: "工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'gcjsgl\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '决算成本编制') {
        $('#reportTable8').bootstrapTable({
            url: "api/queryTableJscbbz?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_name",
                    title: "工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_no",
                    title: "工程编码",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'jscbbz\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '外协计划') {
        $('#reportTable9').bootstrapTable({
            url: "api/queryTableWxjh?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_name",
                    title: "外协工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_no",
                    title: "工程编码",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "negotiation_name",
                    title: "外协商名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "expenses",
                    title: "外协费用计划金额",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'wxjh\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '外协结算') {
        $('#reportTable10').bootstrapTable({
            url: "api/queryTableWxjs?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编号",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_name",
                    title: "主体工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_no",
                    title: "工程编号",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "negotiation_name",
                    title: "外协商名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "expenses",
                    title: "外协结算金额",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'wxjs\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '收入发票登记') {
        $('#reportTable11').bootstrapTable({
            url: "api/queryTableSrfpdj?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_name",
                    title: "工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_no",
                    title: "工程编号",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "total_incl",
                    title: "价税合计",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "invoice_no",
                    title: "发票号码",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'srfpdj\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }


    if(tableName == '外协费') {
        $('#reportTable12').bootstrapTable({
            url: "api/queryTableWxf?source_pk="+source_pk,
            method: 'get',
            cache: false,
            height: ph,
            striped: true,
            pagination: true,
            pageSize: 20,
            pageNumber: 1,
            pageList: [10, 20, 50, 100, 200, 500],
            search: false,
            showColumns: false,
            sortable: false,
            showRefresh: false,
            showExport: false,
            exportTypes: ['csv', 'txt', 'xml'],
            search:true,
            trimOnSearch:true,
            // clickToSelect: true,
            columns: [
                {checkbox: true},
                {
                    field: "source_pk",
                    title: "编码",
                    align: "center",
                    valign: "middle",
                    sortable: "false"
                }, {
                    field: "engineering_no",
                    title: "工程名称",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "engineering_name",
                    title: "工程编码",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "production_unit",
                    title: "生产单位",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    field: "reimbursement_amount",
                    title: "报销金额",
                    align: "center",
                    valign: "middle",
                    sortable: "true"
                }, {
                    title: "操作",
                    field: "comment",
                    width: '150px',
                    align: "center",
                    events: "operateEvents",
                    formatter: function (value, row, index) {//value：表示当前单元格中的值,row：表示当前行,index：表示当前行的下标
                        return [
                            '<button id="id_row_download" type="button" onclick="onShowFile(\'' + row.source_pk + '\',\'wxf\',' + index + ')" class="btn btn-info" singleSelected=true>查看</button>',
                            // '<button id="id_row_yulan" type="button" class="btn btn-warning" singleSelected=true>预览</button>',
                        ].join('');
                    }
                }
            ],
            data: [],
            onPageChange: function (size, number) {
            },
            formatNoMatches: function () {
                return '无符合条件的记录';
            }

        });
    }
    setSelPageSizeDom ()
    $(window).resize(function () {
        $('#reportTable').bootstrapTable('resetView');
    });
}

function setSelPageSizeDom (v) {
    $(".page-list").remove()
    let strHtml = `<span class="page-list" style="margin-top: 12px;line-height: 50px;margin-left: 30px">每页显示 
        					<select id="selPageSize" style="border: 1px solid #cccccc; border-radius: 4px; padding: 4px 10px">
					            <option value="5" ${pageSize == 5 ? 'selected' : ''}>5</option>
					            <option value="10" ${pageSize == 10 ? 'selected' : ''}>10</option>
					            <option value="15" ${pageSize == 15 ? 'selected' : ''}>15</option>
					            <option value="30" ${pageSize == 30 ? 'selected' : ''}>30</option>
					            <option value="50" ${pageSize == 50 ? 'selected' : ''}>50</option>
					            <option value="100" ${pageSize == 100 ? 'selected' : ''}>100</option>
				        	</select> 条记录
		        		<span>`
    $(".clearfix").append(strHtml);

}
// 获取勾选复选框中的信息
function checkFun() {
    let checkArr = [];
    let tableArr = [];

    let reportTable = $("#reportTable"+(tableNames.indexOf(tableName)+1)).bootstrapTable('getSelections');

    if(reportTable.length > 0){
        for(let i in reportTable){
            checkArr.push(reportTable[i].source_pk);
            tableArr.push(table_name[tableNames.indexOf(tableName)]);
        }
    }

    return [checkArr,tableArr]
}